﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Data.Objects;
using DataLayer.Entities;
namespace DataLayer.Configuration
{
    public class KnowledgeAreaConfiguration : EntityConfiguration<KnowledgeArea>
    {
        public KnowledgeAreaConfiguration()
        {
            Property(ka => ka.KnowledgeAreaID).IsIdentity();
            MapSingleType(u => EntityMap.Row(
          EntityMap.Column(u.KnowledgeAreaID),
          EntityMap.Column(u.Description)
          )).ToTable("KnowledgeArea");
            Relationship<AcademicOrganization>(ka => ka.AcademicOrganizations).FromProperty(x => x.KnowledgeAreas);
            Relationship<Contribution>(c => c.Contrributions).FromProperty(x => x.KnowledgeAreas);
        }
    }
}
